home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / CUJ9206.ARJ / 1006036A < prev    next >
Text File  |  1992-06-02  |  621b  |  30 lines

  1.  
  2.     #include <graphics.h> 
  3.     #include <stdarg.h> 
  4.     #include <stdio.h> 
  5.  
  6.     int gprintf(int x, int y, char *fmt, ...) 
  7.         { 
  8.         int len; 
  9.         char buf[100]; 
  10.         va_list args; 
  11.  
  12.         va_start(args, fmt); 
  13.  
  14.         len = vsprintf(buf, fmt, args); 
  15.         outtextxy(x, y, buf); 
  16.  
  17.         va_end(args); 
  18.         return len; 
  19.         } 
  20.  
  21.     void main() 
  22.         { 
  23.         int driver=DETECT, mode; 
  24.         initgraph(&driver, &mode, "c:/tc/bgi"); 
  25.         gprintf(100, 200, "Driver=%d, Mode=%d.", driver, mode ); 
  26.         getch(); 
  27.         closegraph(); 
  28.         } 
  29.  
  30.